package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysIncomingMaterialsMapper;
import com.ruoyi.system.domain.SysIncomingMaterials;
import com.ruoyi.system.service.ISysIncomingMaterialsService;

/**
 * 产品申请—进件—进件材料Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class SysIncomingMaterialsServiceImpl implements ISysIncomingMaterialsService 
{
    @Autowired
    private SysIncomingMaterialsMapper sysIncomingMaterialsMapper;

    /**
     * 查询产品申请—进件—进件材料
     * 
     * @param applyId 产品申请id
     * @return 产品申请—进件—进件材料
     */
    @Override
    public SysIncomingMaterials selectSysIncomingMaterialsById(Long applyId)
    {
        return sysIncomingMaterialsMapper.selectSysIncomingMaterialsById(applyId);
    }

    /**
     * 新增产品申请—进件—进件材料
     * 
     * @param sysIncomingMaterials 产品申请—进件—进件材料
     * @return 结果
     */
    @Override
    public int insertSysIncomingMaterials(SysIncomingMaterials sysIncomingMaterials)
    {
        sysIncomingMaterials.setCreateTime(DateUtils.getNowDate());
        return sysIncomingMaterialsMapper.insertSysIncomingMaterials(sysIncomingMaterials);
    }

    /**
     * 修改产品申请—进件—进件材料
     * 
     * @param sysIncomingMaterials 产品申请—进件—进件材料
     * @return 结果
     */
    @Override
    public int updateSysIncomingMaterials(SysIncomingMaterials sysIncomingMaterials)
    {
        return sysIncomingMaterialsMapper.updateSysIncomingMaterials(sysIncomingMaterials);
    }
}
